<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html">


    <h:body>

        <ui:composition template="/resources/template/template.xhtml">

            <ui:define name="content">

                <h:form >
                    <p:panel header="Pharmacy Administration"  styleClass="alignTop" >
                        <p:tabView orientation="left">
                            <p:tab title="1) Medicines">
                                <h:panelGrid columns="1" >
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Categories" action="pharmacy_pharmaceutical_item_category" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="ATC Classification" action="pharmacy_pharmaceutical_item_type" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Generic Names" action="pharmacy_vtm" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Products" action="pharmacy_vmp" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Item Master" action="pharmacy_item_master" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Packs" action="pharmacy_ampp" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Measurment Units" action="pharmacy_measurement_unit" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Frequencies" action="pharmacy_frequency_unit" ></p:commandButton>

                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="2) Institutions">
                                <h:panelGrid columns="1" >
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Manufacturers" action="pharmacy_manufacturer" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Importers" action="pharmacy_importer" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Distributor" action="pharmacy_dealer" ></p:commandButton>                                
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Item Distributors" action="pharmacy_items_distributors" ></p:commandButton>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="3) Categories">
                                <h:panelGrid columns="1" >
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Discard Categories" action="pharmacy_discard_category" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Adjustment Categories" action="pharmacy_adjustment_category" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Bulk Delete Categories" action="pharmacy_pharmaceutical_item_category_edit" ></p:commandButton>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="4) Odering">
                                <h:panelGrid columns="1" >
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Manage Reordering Data" action="pharmacy_set_reorder_manage" ></p:commandButton>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="5) Check Entered Data">
                                <h:panelGrid columns="1">
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Item Distributor" action="pharmacy_item_by_distributor" ></p:commandButton>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="6) Error Checking">
                                <h:panelGrid columns="1">
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Error Detection" action="pharmacy_error_checking" ></p:commandButton>
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Error Detection By Date" action="pharmacy_error_checking_date" ></p:commandButton>                                   
                                    <p:commandButton styleClass="linkButton" ajax="false" value="Error Detection Repport" action="pharmacy_report_department_error" ></p:commandButton>                                   
                                    <p:commandButton styleClass="linkButton" value="Department Stock By Batch minus" action="pharmacy_report_department_stock_by_batch_minus" ajax="false" ></p:commandButton>

                                    <h:panelGroup rendered="false">
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Reset GRN Value" action="#{pharmacyItemExcelManager.resetGrnValue()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="1) Reset Qty Value" action="#{pharmacyItemExcelManager.resetQtyValue()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="2) Reset Transfer Issue Value" action="#{pharmacyItemExcelManager.resetTransferIssueValue()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false"  value="3) Reset Transfer History Value" action="#{pharmacyItemExcelManager.resetTransferHistoryValue()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Reset GRN Reference" action="#{pharmacyItemExcelManager.resetGrnReference()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Reset Bill No" action="#{pharmacyItemExcelManager.resetBillNo()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Remove Duplicates" action="#{pharmacyItemExcelManager.removeDuplicateAmpps()}" />
                                    </h:panelGroup>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="7) Issue To Unit">
                                <h:panelGrid columns="1">
                                    <p:commandButton styleClass="linkButton" ajax="false" value="1) Correction of Issue To Unit (Discount To Margin)" 
                                                    action="#{pharmacyItemExcelManager.correctIssueToUnit1()}" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="2) Correction of Issue To Unit (Reset Gross Net Value )" 
                                                    action="#{pharmacyItemExcelManager.correctIssueToUnit2()}" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="3) Correction of Issue To Unit (Reset Gross Net Value To Old only Cost Issue )" 
                                                    action="#{pharmacyItemExcelManager.correctIssueToUnit3()}" />

                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="8) Major Stock Adjustment">
                                <h:panelGrid columns="1">
                                        <p:commandButton styleClass="linkButton" ajax="false" value="1)Stock Variant Report (Before)" 
                                                action="pharmacy_variant_category_stock_by_item" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="2)Stock Variant Adjustment(After)" 
                                                action="pharmacy_variant_ajustment_pre_list" />
                                    </h:panelGrid>
                            </p:tab>
                            <p:tab title="9) Bulk Update">
                                <h:panelGrid columns="1">
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Update Bulk Categery" 
                                                action="pharmacy_update_categery_bulk" actionListener="#{pharmacyUpdateBulkController.calerAll()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Update Bulk Discount Allowed" 
                                                        action="pharmacy_update_discount_allowed_bulk" actionListener="#{pharmacyUpdateBulkController.calerAll()}" />
                                        <p:commandButton styleClass="linkButton" ajax="false" value="Stock Item List" 
                                                        action="pharmacy_report_non_moving_items" actionListener="#{pharmacyUpdateBulkController.calerAll()}" />
                                    </h:panelGrid> 
                            </p:tab>
                            <p:tab title="10) Set up">
                                <h:panelGrid columns="1" >
                                    <p:commandButton styleClass="linkButton" ajax="false" value="01. Check Item Differences with other Database" action="pharmacy_item_mismatch_report" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="02. Import from Excel" action="pharmacy_item_import" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="03. Import from Excel With Stock" action="/pharmacy/pharmacy_item_import_with_stock" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="04. Import from Excel With Stock with barcode" action="/pharmacy/pharmacy_item_import_by_barcode" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="05. Import from Excel With Stock with name" action="/pharmacy/pharmacy_item_import_stocks_by_name" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="06. Purchase Openning Stock" action="/pharmacy/pharmacy_purchase_openning_stock" rendered="#{webUserController.hasPrivilege('PharmacyPurchase')}" actionListener="#{pharmacyPurchaseController.makeNull()}" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="07. Purchase Openning Stock For Wholesale" action="/pharmacy_wholesale/pharmacy_purchase_openning_stock" rendered="#{webUserController.hasPrivilege('PharmacyPurchase')}" actionListener="#{pharmacyPurchaseController.makeNull()}" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="08. Fix Categories from Excel" action="pharmacy_importer_category" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="09. Fix Barcodes" action="pharmacy_item_import_barcode" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="10. Error Correction" action="pharmacy_error_correction" />
                                    <p:commandButton styleClass="linkButton" ajax="false" value="11. Transfer Request All" action="pharmacy_transfer_request_all" />

                                </h:panelGrid>
                            </p:tab> 
                        </p:tabView>
                        

                    </p:panel>


                </h:form>



            </ui:define>


        </ui:composition>

    </h:body>
</html>
